﻿using System;
using System.Data;
using WP.Commons;

namespace WP.RM.DataEntity
{
    [System.ComponentModel.DesignerCategory("Code")]
    public class RMProductBOMHdrDEL : DataSet, IDataEntity
    {
        public const string TABLENAME_RMProductBOMHDR = "RMProductBOMHdr";
        public const string RECID = "RecId";
        public const string CategoryName = "CategoryName";
        public const string SetName = "SetName";
        public const string ProductName="ProductName";
        public const string TechnicsName = "TechnicsName";
        public const string Remark="Remark";
        public const string TotalDetailCost = "TotalDetailCost";
        public const string TotalWastageCost = "TotalWastageCost";
        public const string TotalLabourCost = "TotalLabourCost";
        public const string TotalWorkCost = "TotalWorkCost";
        public const string TotalCost = "TotalCost";
        public const string WorkCost = "WorkCost";
        public const string StandardUnitCost = "StandardUnitCost";        
        public const string RECSTAMP = "RecStamp";
        public const string ProductInfo = "ProductInfo";
        public const string ProductID = "ProductID";
        public const string CategoryID = "CategoryID";
        public const string SetID = "SetID";
        public const string ProductFItemID = "ProductFItemID";
        public const string ProductType = "ProductType";

        public const string approval1 = "approval1";
        public const string approvalDate1 = "approvalDate1";
        public const string approvalPerson1 = "approvalPerson1";
        public const string approval2 = "approval2";
        public const string approvalDate2 = "approvalDate2";
        public const string approvalPerson2 = "approvalPerson2";
        public const string approval3 = "approval3";
        public const string approvalDate3 = "approvalDate3";
        public const string approvalPerson3 = "approvalPerson3";
        public const string approval4 = "approval4";
        public const string approvalDate4 = "approvalDate4";
        public const string approvalPerson4 = "approvalPerson4";
        public const string approval5 = "approval5";
        public const string approvalDate5 = "approvalDate5";
        public const string approvalPerson5 = "approvalPerson5";

        public const string approval = "approval";
        public const string approvalDate = "approvalDate";
        public const string approvalPerson = "approvalPerson";

        private System.Collections.Specialized.NameValueCollection mVarCollection = new System.Collections.Specialized.NameValueCollection();
        public System.Collections.Specialized.NameValueCollection VarCollection
        {
            get { return mVarCollection; }
            set { mVarCollection = value; }
        }

        public RMProductBOMHdrDEL()
        {
            //Create mCity structure
            CreatemCityStructure();

        }

        //=========mCity============================
        private void CreatemCityStructure()
        {
            DataTable table;
            DataColumnCollection DCC;
            DataColumn DC = new DataColumn();
            table = new DataTable(TABLENAME_RMProductBOMHDR);
            DCC = table.Columns;

            DC = new DataColumn(RECID, typeof(System.Int32));
            DCC.Add(DC);
            
            DC = new DataColumn(CategoryName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            
            DC = new DataColumn(SetName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
             
            DC = new DataColumn(ProductName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(TechnicsName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            
            DC = new DataColumn(Remark, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(ProductInfo, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(ProductID , typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(CategoryID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SetID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(ProductType, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(ProductFItemID, typeof(System.Int32));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(TotalDetailCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
             
            DC = new DataColumn(TotalWastageCost, typeof(System.Double));
            DC.DefaultValue =0;
            DCC.Add(DC);
            
            DC = new DataColumn(TotalLabourCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            
            DC = new DataColumn(TotalWorkCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            
            DC = new DataColumn(TotalCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);                        
           
            DC = new DataColumn(RECSTAMP, typeof(System.Byte[]));
            DCC.Add(DC);

            DC = new DataColumn(WorkCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(StandardUnitCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(approval, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approvalDate, typeof(System.DateTime));
            DCC.Add(DC);
            DC = new DataColumn(approvalPerson, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(approval1, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approvalDate1, typeof(System.DateTime));
            DCC.Add(DC);
            DC = new DataColumn(approvalPerson1, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approval2, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approvalDate2, typeof(System.DateTime));
            DCC.Add(DC);
            DC = new DataColumn(approvalPerson2, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approval3, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approvalDate3, typeof(System.DateTime));
            DCC.Add(DC);
            DC = new DataColumn(approvalPerson3, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approval4, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approvalDate4, typeof(System.DateTime));
            DCC.Add(DC);
            DC = new DataColumn(approvalPerson4, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approval5, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(approvalDate5, typeof(System.DateTime));
            DCC.Add(DC);
            DC = new DataColumn(approvalPerson5, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            this.Tables.Add(table);
        }
    }
}
